package com.ruoyi.workflow.mapper;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.workflow.domain.BpmnNode;
import org.apache.ibatis.annotations.Param;

/**
 * 流程定义节点Mapper接口
 *
 * @author xiaohao
 * @date 2022-11-17
 */
public interface BpmnNodeMapper extends BaseMapper<BpmnNode> {

    /**
     * 查询流程定义节点列表
     *
     * @param bpmnNode 流程定义节点
     * @return 流程定义节点集合
     */
    List<BpmnNode> selectBpmnNodeList(BpmnNode bpmnNode);

    void insertRelation(@Param("nodeId") Long nodeId, @Param("auditor") List<Long> auditor);

    void deleteRelation(Long id);

    List<Long> selectAuditorByNodeId(Serializable id);

    List<BpmnNode> getByInfoId(Long byInfoId);

    List<SysUser> selectUserByNodeKey(String taskDefinitionKey);
}
